package com.ruoyi.web.server.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
import java.util.Map;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

/**
 * <p>
 * 参数和文件保存表
 * </p>
 *
 * @author liuhl
 * @since 2024-06-25
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("RESULT_SAVE")
@ApiModel(value = "ResultSave对象", description = "参数和文件保存表")
public class ResultSave extends Model<ResultSave> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("ID主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty("归属于哪个大模块")
    @TableField("MODULE")
    private String module;

    @ApiModelProperty("大模块下的子模块")
    @TableField("SUBMODULE")
    private String submodule;

    @ApiModelProperty("参数集合，以4个-链接所有的参数")
    @TableField("PARAMS")
    private String params;

    @ApiModelProperty("结果JSON")
    @TableField("RESULT_DATA")
    private String resultData;

    @ApiModelProperty("文件名集合")
    @TableField("FILE_NAMES")
    private String fileNames;

    @ApiModelProperty("起始时间")
    @TableField("START_TIME")
    private String startTime;

    @ApiModelProperty("结束时间")
    @TableField("END_TIME")
    private String endTime;

    @ApiModelProperty("数据时间")
    @TableField("DAT_TIME")
    private LocalDate datTime;

    @ApiModelProperty("创建时间")
    @TableField("CREATE_TIME")
    private Date createTime;

    @ApiModelProperty("更新时间")
    @TableField("UPDATE_TIME")
    private Date updateTime;

    @TableField(exist = false)
    private Map<String,String> paramJson;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
